package com.jsits.v2x.bx05.schedule;

import com.jsits.v2x.bx05.service.Bx05LedDisplayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class Bx05UpdateTask {
    @Autowired
    private Bx05LedDisplayService bx05LedDisplayService;

    @Scheduled(fixedRate = 2000)
    public void updateLedScreen() {
        log.info("task begin...");
        bx05LedDisplayService.updateLedScreen();
        log.info("task finish...");
    }
}
